package com.stu.ssm_02.service.impl;

import com.stu.ssm_02.entity.User;
import com.stu.ssm_02.mapper.IUserMapper;
import com.stu.ssm_02.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ClassName: UserServiceImpl
 * Package: com.stu.ssm_02.service.impl
 * Description: @Version 1.0
 */
@Service
public class UserServiceImpl implements IUserService {
    @Autowired
    private IUserMapper userMapper;
    @Override
    public List<User> getList() {
        return userMapper.getUserList();
    }

    @Override
    public List<User> getUserByUsername(String username) {

        return userMapper.getUserByUsername(username);
    }

    @Override
    public User getUserById(Integer id) {
        return userMapper.getUserById(id);
    }

    @Override
    public int updateImgById(User user) {
        return userMapper.updateImgById(user);
    }

    @Override
    public Integer deleteUserById(int id) {
        return userMapper.deleteUserById(id);
    }

    @Override
    public List<User> getUserListAjax() {
        return userMapper.getUserListAjax();
    }

    @Override
    public Integer deleteUserList(List<Integer> userList) {
        return userMapper.deleteUserList(userList);
    }

    @Override
    public Integer deleteUserListAjax(List<User> userList) {
        return userMapper.deleteUserListAjax(userList);
    }
}
